package com.evitch.csvtrade;

import java.util.Calendar;

import com.evitch.csvtrade.cmd.MT4;

public class MT extends MT4{
	
	private static MT instance;
	private static SynchroFile file;
	
	
	
	
	private MT(){
		file = new SynchroFile();
		setStrategyRunner(file);
	}
	
	public static MT getInstance() {
        if (null == instance) { // Premier appel
            instance = new MT();
        }
        return instance;
    }

	public static SynchroFile getFile() {
		return file;
	}

	/**public void alert(String msg){
		int commandNum = 122;
		String[] params = {msg};
		System.out.println("ret "+execCommand(122,params));
	}*/
	
	
	
	
	
	public String constructRequest(long key,int cmd,String params[]){
		String paramsStr = ""+key+";"+cmd;
		for(int i=0;i<params.length;i++){
			paramsStr += ";"+params[i];
		}
		return paramsStr;
	}
	
	
}
